package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.api.platform.dto.it.CloudManageExport;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;


public class CloudRowMapper implements RowMapper<CloudManageExport> {

    @Override
    public CloudManageExport mapRow(ResultSet rs, int rowNum) throws SQLException {
        CloudManageExport cloudManageExport = new CloudManageExport();
        cloudManageExport.setCloudId(rs.getString("cloud_id"));
        cloudManageExport.setCloudStyle(rs.getString("cloud_style"));
        cloudManageExport.setCloudArea(rs.getString("cloud_area"));
        cloudManageExport.setInsideIp(rs.getString("inside_ip"));
        cloudManageExport.setEip(rs.getString("eip"));
        cloudManageExport.setSlb(rs.getString("slb"));
        cloudManageExport.setOperationSys(rs.getString("operation_sys"));
        cloudManageExport.setCpu(rs.getString("cpu"));
        cloudManageExport.setMemory(rs.getString("memory"));
        cloudManageExport.setManageControl(rs.getString("manage_control"));
        cloudManageExport.setMasterName(rs.getString("master_name"));
        cloudManageExport.setApplication(rs.getString("application"));
        cloudManageExport.setName(rs.getString("name"));
        cloudManageExport.setDepartment(rs.getString("department"));

        return cloudManageExport;
    }
}

